package com.example.twodimensioncodedemo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.huyi.zxing.CaptureActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import demo.zdc.com.myapplication.R;

/**
 * Created by mhysa on 2017/2/14.
 */
public class ScannerShow extends Activity {

    @Bind(R.id.tv_scannershow)
    TextView tvScannershow;
    @Bind(R.id.ll_scanner)
    LinearLayout llScanner;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_scannershow2);
        ButterKnife.bind(this);
        Intent intent = getIntent();
        String erCode = intent.getStringExtra("erCode");
        tvScannershow.setText(erCode);
        llScanner.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                //打开扫描界面扫描条形码或二维码
                Intent openCameraIntent = new Intent(ScannerShow.this,CaptureActivity.class);
                startActivityForResult(openCameraIntent, 0);
                finish();
            }
        });
        /*btnGoOn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                //打开扫描界面扫描条形码或二维码
                Intent openCameraIntent = new Intent(ScannerShow.this,CaptureActivity.class);
                startActivityForResult(openCameraIntent, 0);
            }
        });*/
    }


}
